#include<iostream>
#include<cstring>
using namespace std;
long long f[51],n;

long long fib(int i){
	if(f[i]!=0)return f[i];
	f[i]=fib(i-2)+fib(i-1);
	return f[i];
}

int main(){
	cin>>n;
	int m;
	f[1]=f[2]=1;
	for(int i=1;i<=n;i++){
		cin>>m;
		cout<<fib(m)<<endl;
	} 

	return 0;
}